package com.example.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;

@Data
@JsonIgnoreProperties(ignoreUnknown = true) // 标注 忽略未知属性
@Schema(description = "密码登录参数")
public class PasswordLoginDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description =  "用户名", required = true, example = "admin")
    @NotNull(message = "username{login.require}")
    private String username;

    @Schema(description =  "密码", required = true, example = "admin")
    @NotNull(message = "password{login.require}")
    private String password;

    @Schema(description =  "验证码", required = true)
    @NotNull(message = "captcha{login.require}")
    private String captcha;

    @Schema(description =  "uuid", required = true, example = "123")
    @NotNull(message = "uuid{login.require}")
    private String uuid;
    @Schema(description =  "密码是否前端加密", required = false, example = "true")
    private Boolean isNotDecrypt;
}
